!function () {
    const main = {
        // 获取数据
        getVideoURL: function () {
            $.ajax({
                url: "https://www.easy-mock.com/mock/5ad9997a9920725e3e3e3146/video",
                type: "get",
                success: function (s) {
                    main.managerData(s);
                },
                error: function (e) {
                    console.log("获取video失败" + e);
                }
            });
        },
        // 将获取到的数据 处理
        managerData: function (s) {
            let VideoURL = s.data.videoURL;
            // console.log(VideoURL);
            main.playVideo(VideoURL);
        },
        // 将处理好的视频链接添加到video标签 src中
        playVideo: function (VideoURL) {
            document.getElementById('videoPlay').setAttribute('src', VideoURL);
        }
    };
    main.getVideoURL();
}();